![]() |
UnpackBits |
||||
Header: | Quickdraw.h | Carbon status: | Supported | |
Decompresses a data buffer containing data compressed by PackBits.
void UnpackBits ( Ptr *srcPtr, Ptr *dstPtr, SInt16 dstBytes );
On entry, a pointer to the first byte of a buffer of data to be decompressed. On exit, a pointer to the first byte following the compressed data.
On entry, a pointer to the first byte in which to store decompressed data. On exit, a pointer to the first byte following the decompressed data.
The number of bytes of the data before compression. Use PackBits to compress data structures of a fixed size that you can then pass in this parameter to UnpackBits, or store with the compressed data the original size of the uncompressed data.
Because your application must allocate memory for the source and destination buffers, UnpackBits does not move relocatable blocks. Thus, you can call it at interrupt time.
Because UnpackBits changes the values of the srcPtr and dstPtr parameters, you should pass to UnpackBits only copies of the pointers to the source and destination buffers. This allows you to access the beginning of the source and destination buffers after UnpackBits returns. Also, if the source or destination buffer is stored in an unlocked, relocatable block, this technique prevents UnpackBits from changing the value of a master pointer, which would make the original handle invalid.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)